<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>力邦测控研发中心文件仓库</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="{% static 'css/index.css' %}">
    <link rel="stylesheet" href="{% static 'css/bootstrap-4.2.1.css' %}">
    <link rel="stylesheet" href="{% static 'sweetalert/sweetalert.css' %}">
    <script src="{% static 'sweetalert/xtalert.js' %}"></script>
    <script src="{% static 'sweetalert/sweetalert.min.js' %}"></script>
    <style>
        a {
            text-decoration: none;
        }
    </style>
</head>
<body>
<nav class='nav'>
    <ul class='nav-links'>

    </ul>
    <h1 class='nav-logo'> 力邦测控研发中心文件仓库 </h1>
    <ul class='nav-lang'>
        <li><a href="{% url 'myadmin:upload_file' %}" style="text-decoration:none">上传</a></li>
        <li><a href="{% url 'myadmin:File_List' %}" style="text-decoration:none">下载</a></li>
        {% if request.session.user %}
            <li><img src="{% static 'img/head.jpeg' %}" alt=""
                     style="width: 30px;height: 30px;margin-right: 10px;border-radius: 50%;"><a
                    href="">{{ request.session.user }}</a></li>
            <li><a href="#" id="exit">退出</a></li>
        {% else %}
            <li><a href="{% url 'myadmin:User_Login' %}" style="text-decoration:none">登录</a></li>
        {% endif %}
    </ul>
</nav>
<div class='intro-wrapper'>
    <div class='centered'>
        <div class='square'></div>
    </div>
    <div class='centered'>
        <h1 class='intro-title'><span>力</span><span>邦</span><span>测</span><span>控</span></h1>
    </div>
</div>
<div class='wrapper'>
    <div class='gallery'>
        <div class='gallery-background'>
            <div class='image-wrapper' id='wrapper-1'>
                <div class='image-clip middle'>
                    <div class='image img-1'></div>
                </div>
                <div class='image-clip top'>
                    <div class='image img-1'></div>
                </div>
                <div class='image-clip bottom'>
                    <div class='image img-1'></div>
                </div>
            </div>
            <div class='image-wrapper' id='wrapper-2'>
                <div class='image-clip middle'>
                    <div class='image img-2'></div>
                </div>
                <div class='image-clip top'>
                    <div class='image img-2'></div>
                </div>
                <div class='image-clip bottom'>
                    <div class='image img-2'></div>
                </div>
            </div>
            <div class='image-wrapper' id='wrapper-3'>
                <div class='image-clip middle'>
                    <div class='image img-3'></div>
                </div>
                <div class='image-clip top'>
                    <div class='image img-3'></div>
                </div>
                <div class='image-clip bottom'>
                    <div class='image img-3'></div>
                </div>
            </div>
        </div>
    </div>
    <div class='slider-shop'>
        <h1 style="text-decoration:none;">既然改变不了过去，那么就努力改变未来。</h1>
    </div>
</div>
<script src="{% static 'js/jquery-3.3.1.min.js' %}"></script>
<script>
    //定义一个函数
    function sleep() {
        window.location.reload();
    }

    $('#exit').click(function () {
        $.ajax({
            url: "{% url 'myadmin:User_Logout' %}",//路径
            type: "GET", //提交方式
            success: function (result) {//返回数据根据结果进行相应的处理
                if (result.code = 200) {
                    xtalert.alertSuccessToast("退出成功，欢迎下次光临小店！");
                    setTimeout(sleep, 1200)
                }
            },
            error: function (error) {
                xtalert.alertErrorToast("500，请稍后尝试")
            }

        });
    })
</script>
<!-- partial -->
<script src="{% static 'js/anime.js' %}"></script>
<script src='{% static "js/hammer.js" %}'></script>
<script src="{% static 'js/index.js' %}"></script>
<script src="{% static 'js/vendor/bootstrap.min.js' %}"></script>

</body>
</html>